home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODF-Interest Archive / August 96 / Re ODF and printing.1 < prev    next >
Encoding:
Internet Message Format  |  1996-08-09  |  1.6 KB  |  [TEXT/ttxt]

  1. Subject:     Re: ODF and printing
  2. Sent:        8/8/96 1:12 AM
  3. Received:    8/8/96 8:57 AM
  4. From:        Oliver Breidenbach, oliver@boinx.com
  5. Reply-To:    ODF Interest, ODF-Interest@CILabs.ORG
  6. To:          OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
  7.  
  8. Henri,
  9.  
  10. >Did you try to print your part using another container (ODFDraw) or 
  11. >implement printing in your part and check what was the output.
  12.  
  13. thanks for your reply. Yes, I checked printing with ODFDraw R1 and got
  14. the same result. No, we did not implement printing ourselves. I had a
  15. look at the docmentation for implementing printing, but it only deals
  16. with the problem of not rendering certain portions of your view and
  17. changeing the print dialogs.
  18.  
  19. As I said we just changed the Hello demo part code:
  20.  
  21. void CLotsOSwimmersFrame::Draw(Environment *ev, ODFacet* odFacet,
  22. ODShape* invalidShape)    // Override
  23. {
  24.     FW_CViewContext fc(ev, this, odFacet, invalidShape);
  25.     FW_CRect invalidRect;
  26.     fc.GetClipRect(invalidRect);
  27.     
  28.     fLotsOSwimmersContent->GetTextData().ExportCString(code);
  29.     
  30.     FW_CRectShape::RenderRect(fc, invalidRect, FW_kFill,
  31. FW_kWhiteEraseInk);
  32.  
  33.     FW_CRect lotsoSwimmersRect = GetBounds(ev)
  34.         
  35.     FW_CPoint myX = lotsoSwimmersRect.TopLeft();
  36.     FW_CPoint myY = lotsoSwimmersRect.BotLeft();
  37.  
  38.     // Here some code that calculates a float y
  39.  
  40.     for (float y = 0.5; y < 16.0; y = y + 0.8)
  41.     {
  42.     FW_CRect myRect = FW_CRect( myX + FW_CPoint(FW_DoubleToFixed(y), 
  43. FW_DoubleToFixed( 5.0)), myY + FW_CPoint(FW_DoubleToFixed(y + 0.3), 
  44. FW_DoubleToFixed(-25.0)));
  45.     
  46.     FW_CRectShape::RenderRect(fc, myRect, FW_kFill,
  47. FW_CInk(FW_kRGBBlack));
  48.     }
  49. }
  50.  
  51.  
  52.  
  53.  
  54.